package com.study.spmongodb.wwj.thread2.char11;

/**
 * @author MI
 * @version 1.0
 * @date 2020/12/8 21:12
 */
public class QueryFromHttpAction {

    public void execute() {
        try {
            Thread.sleep(1000);
            final Context context = ActionContext.getActionContext().getContext();
            context.setCardId(context.getName() + Thread.currentThread().getName());
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    private String getCardId(String name) {
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "1234567890-" + Thread.currentThread().getName();
    }
}
